﻿using Application.IService.User;
using Domain.Entity.User;

namespace ApiServer.HostedService
{
    public class MyHostService : BackgroundService
    {
        //private Timer _timer;
        private List<UserInfo> users;
        protected override Task ExecuteAsync(CancellationToken stoppingToken)
        {
            MyTestTimeer time=new MyTestTimeer(ConsoleOut, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
            
            return Task.CompletedTask;
        }
        private void ConsoleOut(object state)
        {
            Console.WriteLine($"{DateTime.Now}执行，");
        }
    }
}
